class TreeNode {
    val; //节点值
    left; //左子节点
    right; //右子节点
    //构造函数
    constructor(val, left = null, right = null) {
        this.val = val; //节点值
        this.left = left; //左子节点
        this.right = right; //右子节点
    }
}

